package services

import (
	"{{.ProjectName}}/utils"
	viewmodels "{{.ProjectName}}/view_models"

	"github.com/gin-gonic/gin"
)

type ExampleService struct{}

func (s *ExampleService) Ping(ctx *gin.Context) (viewmodels.ExampleOutput, error) {
	out := viewmodels.ExampleOutput{}
	input := viewmodels.ExampleInput{}
	if err := utils.FbindParams(ctx, &input); err != nil {
		return out, err
	}
	out.Resp = "ping test " + input.Name
	return out, nil
}
